package lex.mtd.ui;

import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

public class StatusPane extends JPanel {
	private JLabel statusLabel;
	private JLabel speedLabel;

	public StatusPane() {
		this.initialize();
	}

	private void initialize() {
		{
			BorderLayout thisLayout = new BorderLayout();
			thisLayout.setHgap(5);
			thisLayout.setVgap(2);
			this.setLayout(thisLayout);
			this.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
			this.add(getStatusLabel(), BorderLayout.CENTER);
			this.add(getSpeedLabel(), BorderLayout.EAST);
		}
	}

	private JLabel getStatusLabel() {
		if (statusLabel == null) {
			statusLabel = new JLabel();
			statusLabel.setText("Status OK.");
		}
		return statusLabel;
	}

	private JLabel getSpeedLabel() {
		if (speedLabel == null) {
			speedLabel = new JLabel();
			speedLabel.setText("0 KB");
		}
		return speedLabel;
	}
}
